from langchain_ollama import OllamaLLM
import langchain
from langchain.globals import set_debug, set_verbose

# 实例化 OllamaLLM 语言模型
llm = OllamaLLM(model="deepseek-r1:7b")
# langchain.debug = True
langchain.verbose = True
# set_debug(True)
set_verbose(True)
# 调用模型进行推理
response = llm.invoke("你是谁？")
print("模型回答:", response)
# sk-dqRjVh22RuqhoWNNfwtbPaOrRR5vbsmToMP0NYEUKC0id7xw